package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type AlibabaSscSupplyplatformServiceabilitySaveRequest struct {
	/*
	   目前包含三种。in_store 到店；at_home 上门；transmit_service 寄修。请根据实际支持的履约类型填写     */
	FulfilTypeList *[]string `json:"fulfil_type_list" required:"true" `
	/*
	   服务sku，具体的sku列表可以从服务商工作台的类目树获取     */
	ServiceSkuCodeList *[]string `json:"service_sku_code_list" required:"true" `
	/*
	   菜鸟地址编码，各级地址均可（全国、省、市、区、街道），根据实际支持的地区填写。当支持的履约类型包含上门时，必填     */
	AreaCodeList *[]int64 `json:"area_code_list,omitempty" required:"false" `
	/*
	   服务提供者id。根据服务提供者类型填写相应的id，例如类型是网点，则填我们系统的网点id     */
	ProviderId *int64 `json:"provider_id,omitempty" required:"false" `
	/*
	   服务提供者类型。service_store 网点；worker 工人；supplier 服务商     */
	ProviderType *string `json:"provider_type" required:"true" `
	/*
	   服务提供者code。外部与天猫对接时，自己定义的code用这个字段     */
	ProviderCode *string `json:"provider_code,omitempty" required:"false" `
}

func (s *AlibabaSscSupplyplatformServiceabilitySaveRequest) SetFulfilTypeList(v []string) *AlibabaSscSupplyplatformServiceabilitySaveRequest {
	s.FulfilTypeList = &v
	return s
}
func (s *AlibabaSscSupplyplatformServiceabilitySaveRequest) SetServiceSkuCodeList(v []string) *AlibabaSscSupplyplatformServiceabilitySaveRequest {
	s.ServiceSkuCodeList = &v
	return s
}
func (s *AlibabaSscSupplyplatformServiceabilitySaveRequest) SetAreaCodeList(v []int64) *AlibabaSscSupplyplatformServiceabilitySaveRequest {
	s.AreaCodeList = &v
	return s
}
func (s *AlibabaSscSupplyplatformServiceabilitySaveRequest) SetProviderId(v int64) *AlibabaSscSupplyplatformServiceabilitySaveRequest {
	s.ProviderId = &v
	return s
}
func (s *AlibabaSscSupplyplatformServiceabilitySaveRequest) SetProviderType(v string) *AlibabaSscSupplyplatformServiceabilitySaveRequest {
	s.ProviderType = &v
	return s
}
func (s *AlibabaSscSupplyplatformServiceabilitySaveRequest) SetProviderCode(v string) *AlibabaSscSupplyplatformServiceabilitySaveRequest {
	s.ProviderCode = &v
	return s
}

func (req *AlibabaSscSupplyplatformServiceabilitySaveRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.FulfilTypeList != nil {
		paramMap["fulfil_type_list"] = util.ConvertBasicList(*req.FulfilTypeList)
	}
	if req.ServiceSkuCodeList != nil {
		paramMap["service_sku_code_list"] = util.ConvertBasicList(*req.ServiceSkuCodeList)
	}
	if req.AreaCodeList != nil {
		paramMap["area_code_list"] = util.ConvertBasicList(*req.AreaCodeList)
	}
	if req.ProviderId != nil {
		paramMap["provider_id"] = *req.ProviderId
	}
	if req.ProviderType != nil {
		paramMap["provider_type"] = *req.ProviderType
	}
	if req.ProviderCode != nil {
		paramMap["provider_code"] = *req.ProviderCode
	}
	return paramMap
}

func (req *AlibabaSscSupplyplatformServiceabilitySaveRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
